package JudgeProcess;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class FileProcess 
{
    public String ACT001_readFile(String fileName)
    {
    	String read_content = "";
    	FileReader fr = null;
	    String str_read = null;
	    String[] list_str = null;
	    int num_a = 0, num_b = 0;
		try 
		{
			fr = new FileReader(fileName);
		    BufferedReader br = new BufferedReader(fr);
		    while ((str_read = br.readLine()) != null) 
		    {
		    	read_content = read_content + str_read;
		    }
		    fr.close();
		    br.close();
		} 
		catch (FileNotFoundException e) 
		{
			//e.printStackTrace();
			return "error";
		} 
		catch (IOException e) 
		{
			e.printStackTrace();
		}
    	return read_content;
    }
    public void ACT002_delFile(String fileName)
    {
    	File file = new File(fileName);
    	file.delete();
    }
}
